home *** CD-ROM | disk | FTP | other *** search
/ PCMania 19 / PCMania19.iso / Jogos em Flash / CARTAS / CARIBBEAN_POKER.SWF / scripts / DefineSprite_183 / frame_17 / DoAction.as
Text File  |  2002-05-07  |  2KB  |  89 lines

  1. if((x6 == "1" or x7 == "1" or x8 == "1" or x9 == "1" or x10 == "1") and (x6 == "13" or x7 == "13" or x8 == "13" or x9 == "13" or x10 == "13"))
  2. {
  3.    DealerHand = "1";
  4. }
  5. i = "7";
  6. u0 = "0";
  7. u1 = "0";
  8. un = "0";
  9. while(i < "11")
  10. {
  11.    if(eval("p" add i) == eval("p" add (i - "1")))
  12.    {
  13.       set("u" add un,eval("u" add un) + "1");
  14.       set("pairNum" add un,eval("p" add i));
  15.    }
  16.    else if("0" < eval("u" add un))
  17.    {
  18.       un += "1";
  19.    }
  20.    i += "1";
  21. }
  22. if(u0 == "3")
  23. {
  24.    DealerHand = "8";
  25. }
  26. if(u0 == "2")
  27. {
  28.    DealerHand = "4";
  29. }
  30. if(u0 == "1")
  31. {
  32.    DealerHand = "2";
  33. }
  34. if(u0 == "2" and u1 == "1" or u0 == "1" and u1 == "2")
  35. {
  36.    DealerHand = "7";
  37. }
  38. if(u0 == "1" and u1 == "1")
  39. {
  40.    DealerHand = "3";
  41. }
  42. i = "7";
  43. straight = "1";
  44. while(i < "11")
  45. {
  46.    if(eval("x" add i) != eval("x" add (i - "1")) + "1")
  47.    {
  48.       straight = "0";
  49.    }
  50.    i += "1";
  51. }
  52. if(straight == "1" or x6 == "1" and x7 == "10" and x8 == "11" and x9 == "12" and x10 == "13")
  53. {
  54.    straight = "1";
  55.    DealerHand = "5";
  56. }
  57. i = "7";
  58. flush = "1";
  59. while(i < "11")
  60. {
  61.    if(eval("z" add i) != eval("z" add (i - "1")))
  62.    {
  63.       flush = "0";
  64.    }
  65.    i += "1";
  66. }
  67. if(flush == "1")
  68. {
  69.    DealerHand = "6";
  70. }
  71. if(straight == "1" and flush == "1")
  72. {
  73.    DealerHand = "9";
  74. }
  75. if(straight == "1" and flush == "1" and x6 == "1" and x10 == "13")
  76. {
  77.    DealerHand = "10";
  78. }
  79. dpair = pairNum0;
  80. dpair2 = pairNum1;
  81. if(dpair == "1")
  82. {
  83.    dpair = "14";
  84. }
  85. if(dpair2 == "1")
  86. {
  87.    dpair2 = "14";
  88. }
  89.